/**
 * // ============================================================================
 * //
 * // Copyright (C) 2006-2007 Dengues
 * //
 * // Google Group: http://groups.google.com/group/dengues
 * // QQ Group: 24885404
 * //
 * // This library is free software; you can redistribute it and/or
 * // modify it under the terms of the GNU Lesser General Public
 * // License as published by the Free Software Foundation; either
 * // version 2.1 of the License.
 * //
 * // This library is distributed in the hope that it will be useful,
 * // but WITHOUT ANY WARRANTY; without even the implied warranty of
 * // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * // Lesser General Public License for more details.
 * //
 * // You should have received a copy of the GNU General Public License
 * // along with this program; if not, write to the Free Software
 * // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 * //
 * // ============================================================================
 * 
 *
 * $Id$
 */
package org.dengues.model.warehouse.impl;

import java.util.Date;
import org.dengues.model.warehouse.Storage;
import org.dengues.model.warehouse.WarehousePackage;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Storage</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.dengues.model.warehouse.impl.StorageImpl#getComment <em>Comment</em>}</li>
 *   <li>{@link org.dengues.model.warehouse.impl.StorageImpl#getName <em>Name</em>}</li>
 *   <li>{@link org.dengues.model.warehouse.impl.StorageImpl#getStatus <em>Status</em>}</li>
 *   <li>{@link org.dengues.model.warehouse.impl.StorageImpl#getUuid <em>Uuid</em>}</li>
 *   <li>{@link org.dengues.model.warehouse.impl.StorageImpl#getCreation <em>Creation</em>}</li>
 *   <li>{@link org.dengues.model.warehouse.impl.StorageImpl#getModified <em>Modified</em>}</li>
 *   <li>{@link org.dengues.model.warehouse.impl.StorageImpl#getPath <em>Path</em>}</li>
 *   <li>{@link org.dengues.model.warehouse.impl.StorageImpl#getCategoryName <em>Category Name</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public abstract class StorageImpl extends EObjectImpl implements Storage {
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static final String copyright = "// ============================================================================\r\n//\r\n// Copyright (C) 2006-2007 Dengues\r\n//\r\n// Google Group: http://groups.google.com/group/dengues\r\n// QQ Group: 24885404\r\n//\r\n// This library is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU Lesser General Public\r\n// License as published by the Free Software Foundation; either\r\n// version 2.1 of the License.\r\n//\r\n// This library is distributed in the hope that it will be useful,\r\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n// Lesser General Public License for more details.\r\n//\r\n// You should have received a copy of the GNU General Public License\r\n// along with this program; if not, write to the Free Software\r\n// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r\n//\r\n// ============================================================================\r\n";

    /**
     * The default value of the '{@link #getComment() <em>Comment</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getComment()
     * @generated
     * @ordered
     */
    protected static final String COMMENT_EDEFAULT = null;
    /**
     * The cached value of the '{@link #getComment() <em>Comment</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getComment()
     * @generated
     * @ordered
     */
    protected String comment = COMMENT_EDEFAULT;
    /**
     * The default value of the '{@link #getName() <em>Name</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getName()
     * @generated
     * @ordered
     */
    protected static final String NAME_EDEFAULT = null;
    /**
     * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getName()
     * @generated
     * @ordered
     */
    protected String name = NAME_EDEFAULT;
    /**
     * The default value of the '{@link #getStatus() <em>Status</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getStatus()
     * @generated
     * @ordered
     */
    protected static final String STATUS_EDEFAULT = null;
    /**
     * The cached value of the '{@link #getStatus() <em>Status</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getStatus()
     * @generated
     * @ordered
     */
    protected String status = STATUS_EDEFAULT;
    /**
     * The default value of the '{@link #getUuid() <em>Uuid</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getUuid()
     * @generated
     * @ordered
     */
    protected static final String UUID_EDEFAULT = null;
    /**
     * The cached value of the '{@link #getUuid() <em>Uuid</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getUuid()
     * @generated
     * @ordered
     */
    protected String uuid = UUID_EDEFAULT;

    /**
     * The default value of the '{@link #getCreation() <em>Creation</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getCreation()
     * @generated
     * @ordered
     */
    protected static final Date CREATION_EDEFAULT = null;

    /**
     * The cached value of the '{@link #getCreation() <em>Creation</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getCreation()
     * @generated
     * @ordered
     */
    protected Date creation = CREATION_EDEFAULT;

    /**
     * The default value of the '{@link #getModified() <em>Modified</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getModified()
     * @generated
     * @ordered
     */
    protected static final Date MODIFIED_EDEFAULT = null;

    /**
     * The cached value of the '{@link #getModified() <em>Modified</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getModified()
     * @generated
     * @ordered
     */
    protected Date modified = MODIFIED_EDEFAULT;

    /**
     * The default value of the '{@link #getPath() <em>Path</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getPath()
     * @generated
     * @ordered
     */
    protected static final String PATH_EDEFAULT = null;

    /**
     * The cached value of the '{@link #getPath() <em>Path</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getPath()
     * @generated
     * @ordered
     */
    protected String path = PATH_EDEFAULT;

    /**
     * The default value of the '{@link #getCategoryName() <em>Category Name</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getCategoryName()
     * @generated
     * @ordered
     */
    protected static final String CATEGORY_NAME_EDEFAULT = null;

    /**
     * The cached value of the '{@link #getCategoryName() <em>Category Name</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getCategoryName()
     * @generated
     * @ordered
     */
    protected String categoryName = CATEGORY_NAME_EDEFAULT;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected StorageImpl() {
        super();
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass() {
        return WarehousePackage.Literals.STORAGE;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getComment() {
        return comment;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setComment(String newComment) {
        String oldComment = comment;
        comment = newComment;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WarehousePackage.STORAGE__COMMENT, oldComment, comment));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getName() {
        return name;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setName(String newName) {
        String oldName = name;
        name = newName;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WarehousePackage.STORAGE__NAME, oldName, name));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getStatus() {
        return status;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setStatus(String newStatus) {
        String oldStatus = status;
        status = newStatus;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WarehousePackage.STORAGE__STATUS, oldStatus, status));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getUuid() {
        return uuid;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setUuid(String newUuid) {
        String oldUuid = uuid;
        uuid = newUuid;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WarehousePackage.STORAGE__UUID, oldUuid, uuid));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public Date getCreation() {
        return creation;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setCreation(Date newCreation) {
        Date oldCreation = creation;
        creation = newCreation;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WarehousePackage.STORAGE__CREATION, oldCreation, creation));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public Date getModified() {
        return modified;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setModified(Date newModified) {
        Date oldModified = modified;
        modified = newModified;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WarehousePackage.STORAGE__MODIFIED, oldModified, modified));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getPath() {
        return path;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setPath(String newPath) {
        String oldPath = path;
        path = newPath;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WarehousePackage.STORAGE__PATH, oldPath, path));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getCategoryName() {
        return categoryName;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setCategoryName(String newCategoryName) {
        String oldCategoryName = categoryName;
        categoryName = newCategoryName;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, WarehousePackage.STORAGE__CATEGORY_NAME, oldCategoryName, categoryName));
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case WarehousePackage.STORAGE__COMMENT:
                return getComment();
            case WarehousePackage.STORAGE__NAME:
                return getName();
            case WarehousePackage.STORAGE__STATUS:
                return getStatus();
            case WarehousePackage.STORAGE__UUID:
                return getUuid();
            case WarehousePackage.STORAGE__CREATION:
                return getCreation();
            case WarehousePackage.STORAGE__MODIFIED:
                return getModified();
            case WarehousePackage.STORAGE__PATH:
                return getPath();
            case WarehousePackage.STORAGE__CATEGORY_NAME:
                return getCategoryName();
        }
        return super.eGet(featureID, resolve, coreType);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case WarehousePackage.STORAGE__COMMENT:
                setComment((String)newValue);
                return;
            case WarehousePackage.STORAGE__NAME:
                setName((String)newValue);
                return;
            case WarehousePackage.STORAGE__STATUS:
                setStatus((String)newValue);
                return;
            case WarehousePackage.STORAGE__UUID:
                setUuid((String)newValue);
                return;
            case WarehousePackage.STORAGE__CREATION:
                setCreation((Date)newValue);
                return;
            case WarehousePackage.STORAGE__MODIFIED:
                setModified((Date)newValue);
                return;
            case WarehousePackage.STORAGE__PATH:
                setPath((String)newValue);
                return;
            case WarehousePackage.STORAGE__CATEGORY_NAME:
                setCategoryName((String)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID) {
        switch (featureID) {
            case WarehousePackage.STORAGE__COMMENT:
                setComment(COMMENT_EDEFAULT);
                return;
            case WarehousePackage.STORAGE__NAME:
                setName(NAME_EDEFAULT);
                return;
            case WarehousePackage.STORAGE__STATUS:
                setStatus(STATUS_EDEFAULT);
                return;
            case WarehousePackage.STORAGE__UUID:
                setUuid(UUID_EDEFAULT);
                return;
            case WarehousePackage.STORAGE__CREATION:
                setCreation(CREATION_EDEFAULT);
                return;
            case WarehousePackage.STORAGE__MODIFIED:
                setModified(MODIFIED_EDEFAULT);
                return;
            case WarehousePackage.STORAGE__PATH:
                setPath(PATH_EDEFAULT);
                return;
            case WarehousePackage.STORAGE__CATEGORY_NAME:
                setCategoryName(CATEGORY_NAME_EDEFAULT);
                return;
        }
        super.eUnset(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case WarehousePackage.STORAGE__COMMENT:
                return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
            case WarehousePackage.STORAGE__NAME:
                return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
            case WarehousePackage.STORAGE__STATUS:
                return STATUS_EDEFAULT == null ? status != null : !STATUS_EDEFAULT.equals(status);
            case WarehousePackage.STORAGE__UUID:
                return UUID_EDEFAULT == null ? uuid != null : !UUID_EDEFAULT.equals(uuid);
            case WarehousePackage.STORAGE__CREATION:
                return CREATION_EDEFAULT == null ? creation != null : !CREATION_EDEFAULT.equals(creation);
            case WarehousePackage.STORAGE__MODIFIED:
                return MODIFIED_EDEFAULT == null ? modified != null : !MODIFIED_EDEFAULT.equals(modified);
            case WarehousePackage.STORAGE__PATH:
                return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
            case WarehousePackage.STORAGE__CATEGORY_NAME:
                return CATEGORY_NAME_EDEFAULT == null ? categoryName != null : !CATEGORY_NAME_EDEFAULT.equals(categoryName);
        }
        return super.eIsSet(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public String toString() {
        if (eIsProxy()) return super.toString();

        StringBuffer result = new StringBuffer(super.toString());
        result.append(" (comment: ");
        result.append(comment);
        result.append(", name: ");
        result.append(name);
        result.append(", status: ");
        result.append(status);
        result.append(", uuid: ");
        result.append(uuid);
        result.append(", creation: ");
        result.append(creation);
        result.append(", modified: ");
        result.append(modified);
        result.append(", path: ");
        result.append(path);
        result.append(", categoryName: ");
        result.append(categoryName);
        result.append(')');
        return result.toString();
    }

} //StorageImpl
